<html>
   <head>
      <link rel="stylesheet" type="text/css" href="style.css" />
   </head>
   <body onload="">
<h2 class="comptitle">Simple Module <i>Kademlia</i></h2>
<b>Package:</b> oversim.overlay.kademlia<br/><b>File: <a href="src-overlay-kademlia-Kademlia.ned.html">src/overlay/kademlia/Kademlia.ned</a></b><br/><p><a href="../doxy/classBaseOverlay.html" target="mainframe"><b>C++ definition</b></a></p>

<p>The main module of the <a href="oversim.overlay.kademlia.Kademlia.html">Kademlia</a> implementation</p>
<p><b>Author:</b> Sebastian Mies, Ingmar Baumgart, Bernhard Heep</p>
<img src="oversim.overlay.kademlia.Kademlia-type.png" ismap="yes" usemap="#type-diagram"/><map name="type-diagram">
<area shape="rect" href="oversim.overlay.kademlia.Kademlia.html" title="Kademlia" alt="Kademlia" coords="0,0,99,40">
</map>
<h3 class="subtitle">Usage diagram:</h3>
<p>The following diagram shows usage relationships between types.
Unresolved types are missing from the diagram.
Click <a href="full-ned-usage-diagram.html">here</a> to see the full picture.</p>
<img src="oversim.overlay.kademlia.Kademlia-usage.png" ismap="yes" usemap="#usage-diagram"/><map name="usage-diagram"><area shape="rect" id="node1" href="oversim.overlay.kademlia.Kademlia.html" title="Simple Module Kademlia" alt="" coords="31,83,105,111">
<area shape="rect" id="node2" href="oversim.overlay.kademlia.KademliaModules.html" title="Compound Module KademliaModules" alt="" coords="5,6,131,34">
</map>
<h3 class="subtitle">Inheritance diagram:</h3>
<p>The following diagram shows inheritance relationships for this type.
Unresolved types are missing from the diagram.
Click <a href="full-ned-inheritance-diagram.html">here</a> to see the full picture.</p>
<img src="oversim.overlay.kademlia.Kademlia-inheritance.png" ismap="yes" usemap="#inheritance-diagram"/><map name="inheritance-diagram"><area shape="rect" id="node1" href="oversim.overlay.kademlia.Kademlia.html" title="Simple Module Kademlia" alt="" coords="16,83,91,111">
<area shape="rect" id="node2" href="oversim.common.BaseOverlay.html" title="Simple Module BaseOverlay" alt="" coords="5,6,101,34">
</map>
<h3 class="subtitle">Extends:</h3>
<table>
<tr>
   <td>
      <a href="oversim.common.BaseOverlay.html">BaseOverlay</a>
      <i> (simple&nbsp;module)</i>
   </td>
   <td>

<p>Base class for overlay implementations</p>
   </td>
</tr>
</table>
<h3 class="subtitle">Used in compound modules:</h3>
<p>If a module type shows up more than once, that means it has been defined in more than one NED file.</p>
<table>
<tr>
   <td>
      <a href="oversim.overlay.kademlia.KademliaModules.html">KademliaModules</a>
      <i> (compound&nbsp;module)</i>
   </td>
   <td>

<p>Implementation of the <a href="oversim.overlay.kademlia.Kademlia.html">Kademlia</a> <a href="oversim.applications.dht.DHT.html">DHT</a> overlay as described in
"<a href="oversim.overlay.kademlia.Kademlia.html">Kademlia</a>: A peer-to-peer information system based on the XOR metric"
by P. Maymounkov and D. Mazieres, published in "In Proceedings of IPTPS02"</p>
   </td>
</tr>
</table>
<h3 class="subtitle">Parameters:</h3>
<table class="paramtable">
   <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Default value</th>
      <th>Description</th>
   </tr>
<tr class="inherited">
   <td width="150">rpcUdpTimeout</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>default timeout value for direct RPCs</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">rpcKeyTimeout</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>default timeout value for routed RPCs</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">optimizeTimeouts</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>calculate timeouts from measured RTTs
and network coordinates</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">rpcExponentialBackoff</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>if true, doubles the timeout for
every retransmission</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">localPort</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120"></td>
   <td>
<p>UDP port for overlay messages</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">debugOutput</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>enable debug output</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">keyLength</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120"></td>
   <td>
<p>overlay key length in bits</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">nodeId</td>
   <td width="100">
      <i>string</i>
   </td>
   <td width="120"></td>
   <td>
<p>optional nodeId as string in hexadecimal notation</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">useCommonAPIforward</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>enable CommonAPI forward() calls</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">drawOverlayTopology</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>draw arrow to successor node?</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">hopCountMax</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120"></td>
   <td>
<p>maximum number of overlay hops</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">recNumRedundantNodes</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120"></td>
   <td>
<p>numRedundantNodes for recursive routing</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">joinOnApplicationRequest</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>only join the overlay on application request</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">collectPerHopDelay</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>delay statistics for single hops</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">routeMsgAcks</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>use RPCs for route messages</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">lookupRedundantNodes</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120"></td>
   <td>
<p>number of next hops in each step</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">lookupParallelPaths</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120"></td>
   <td>
<p>number of parallel paths</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">lookupParallelRpcs</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120"></td>
   <td>
<p>number of nodes to ask in parallel</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">lookupVerifySiblings</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>true, if siblings need to be authenticated with a ping</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">lookupMajoritySiblings</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>true, if sibling candidates are selected by a majority decision if using parallel paths</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">lookupMerge</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>true, if parallel Rpc results should be merged</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">lookupFailedNodeRpcs</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>communicate failed nodes</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">lookupStrictParallelRpcs</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>limited the number of concurrent rpcs to parameter parallelRpcs</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">lookupUseAllParallelResponses</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>merge all parallel responses from earlier steps</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">lookupNewRpcOnEveryTimeout</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>send a new RPC immediately after an RPC timeouts</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">lookupNewRpcOnEveryResponse</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>send a new RPC after every response, even if there was no progress</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">lookupFinishOnFirstUnchanged</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>finish lookup, if the last pending RPC returned without progress</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">lookupVisitOnlyOnce</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>if true, the same node is never asked twice during a single lookup</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">lookupAcceptLateSiblings</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>if true, a <a href="FindNodeResponse.html">FindNodeResponse</a> with sibling flag set is always accepted, even if it is from a previous lookup step</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">routingType</td>
   <td width="100">
      <i>string</i>
   </td>
   <td width="120"></td>
   <td>
<p>default routing mode (iterative, semi-recursive,...)</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">rejoinOnFailure</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>rejoin after loosing connection to the overlay?</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">sendRpcResponseToLastHop</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>needed by KBR protocols for NAT support</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">recordRoute</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>record visited hops on route</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">dropFindNodeAttack</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>if node is malicious, it tries a findNode attack</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">isSiblingAttack</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>if node is malicious, it tries a isSibling attack</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">invalidNodesAttack</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>if node is malicious, it tries a invalidNode attack</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">dropRouteMessageAttack</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>if node is malicious, it drops all received BaseRouteMessages</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">measureAuthBlock</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>if true, measure the overhead of signatures in rpc messages</p>
   </td>
</tr>
<tr class="inherited">
   <td width="150">restoreContext</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>if true, a node rejoins with its old nodeId and malicious state</p>
   </td>
</tr>
<tr class="local">
   <td width="150">minSiblingTableRefreshInterval</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>siblingTable refresh delay</p>
   </td>
</tr>
<tr class="local">
   <td width="150">minBucketRefreshInterval</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>bucket refresh delay</p>
   </td>
</tr>
<tr class="local">
   <td width="150">siblingPingInterval</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>interval in which all siblings get pinged (0 to disable)</p>
   </td>
</tr>
<tr class="local">
   <td width="150">maxStaleCount</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120"></td>
   <td>
<p>number of timeouts before node removal</p>
   </td>
</tr>
<tr class="local">
   <td width="150">k</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120"></td>
   <td>
<p>number of paths (size of k-bucket)</p>
   </td>
</tr>
<tr class="local">
   <td width="150">b</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120"></td>
   <td>
<p>network diameter O(log_{2^(b)})</p>
   </td>
</tr>
<tr class="local">
   <td width="150">s</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120"></td>
   <td>
<p>number of siblings</p>
   </td>
</tr>
<tr class="local">
   <td width="150">exhaustiveRefresh</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>if true, use exhaustive-iterative lookups to refresh buckets</p>
   </td>
</tr>
<tr class="local">
   <td width="150">pingNewSiblings</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>ping new unknown siblings?</p>
   </td>
</tr>
<tr class="local">
   <td width="150">secureMaintenance</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>if true, ping not authenticated nodes before adding them to a bucket</p>
   </td>
</tr>
<tr class="local">
   <td width="150">newMaintenance</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
   </td>
</tr>
<tr class="local">
   <td width="150">enableReplacementCache</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>enables the replacement cache to store nodes if a bucket is full</p>
   </td>
</tr>
<tr class="local">
   <td width="150">replacementCachePing</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>ping the least recently used node in a full bucket, when a node is added to the replacement cache</p>
   </td>
</tr>
<tr class="local">
   <td width="150">replacementCandidates</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120"></td>
   <td>
<p>maximum number of candidates in the replacement cache for each bucket</p>
   </td>
</tr>
<tr class="local">
   <td width="150">siblingRefreshNodes</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120"></td>
   <td>
<p>number of redundant nodes for exhaustive sibling table refresh lookups (0 = numRedundantNodes)</p>
   </td>
</tr>
<tr class="local">
   <td width="150">bucketRefreshNodes</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120"></td>
   <td>
<p>number of redundant nodes for exhaustive bucket refresh lookups (0 = numRedundantNodes)</p>
   </td>
</tr>
<tr class="local">
   <td width="150">activePing</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>R/<a href="oversim.overlay.kademlia.Kademlia.html">Kademlia</a></p>
   </td>
</tr>
<tr class="local">
   <td width="150">proximityRouting</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>enable proximity routing (recursive only)</p>
   </td>
</tr>
<tr class="local">
   <td width="150">proximityNeighborSelection</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>enable proximity neighbor selection</p>
   </td>
</tr>
<tr class="local">
   <td width="150">altRecMode</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>use source-routing mode instead of direct mode</p>
   </td>
</tr>
</table>
<h3 class="subtitle">Properties:</h3>
<table class="paramtable">
   <tr>
      <th>Name</th>
      <th>Value</th>
      <th>Description</th>
   </tr>
<tr>
   <td width="150">class</td>
   <td width="100"><i>Kademlia</i></td>
   <td></td>
</tr>
<tr>
   <td width="150">display</td>
   <td width="100"><i>i=block/circle</i></td>
   <td></td>
</tr>
</table>
<h3 class="subtitle">Gates:</h3>
<table class="paramtable">
   <tr>
      <th>Name</th>
      <th>Direction</th>
      <th>Size</th>
      <th>Description</th>
   </tr>
<tr class="inherited">
   <td width="150">udpIn</xsl:if></td>
   <td width="100"><i>input</i></td>
   <td width="50"></td>   <td>
<p>gate from the UDP layer</p>
</td>
</tr>
<tr class="inherited">
   <td width="150">udpOut</xsl:if></td>
   <td width="100"><i>output</i></td>
   <td width="50"></td>   <td>
<p>gate to the UDP layer</p>
</td>
</tr>
<tr class="inherited">
   <td width="150">tcpIn</xsl:if></td>
   <td width="100"><i>input</i></td>
   <td width="50"></td>   <td>
<p>gate from the TCP layer</p>
</td>
</tr>
<tr class="inherited">
   <td width="150">tcpOut</xsl:if></td>
   <td width="100"><i>output</i></td>
   <td width="50"></td>   <td>
<p>gate to the TCP layer</p>
</td>
</tr>
<tr class="inherited">
   <td width="150">appIn</xsl:if></td>
   <td width="100"><i>input</i></td>
   <td width="50"></td>   <td>
<p>gate from the application</p>
</td>
</tr>
<tr class="inherited">
   <td width="150">appOut</xsl:if></td>
   <td width="100"><i>output</i></td>
   <td width="50"></td>   <td>
<p>gate to the application</p>
</td>
</tr>
<tr class="inherited">
   <td width="150">direct_in</xsl:if></td>
   <td width="100"><i>input</i></td>
   <td width="50"></td>   <td>
<p>gate for sendDirect</p>
</td>
</tr>
</table>
<h3 class="subtitle">Source code:</h3>
<pre class="src"><span style="color: #808080; font-style: italic; ">//
// The main module of the Kademlia implementation
//
// </span><span style="color: #000080; ">@author</span><span style="color: #808080; font-style: italic; "> Sebastian Mies, Ingmar Baumgart, Bernhard Heep
//
</span><span style="color: #800000; font-weight: bold; ">simple</span><span style="color: #000000; "> </span><span style="color: #000000; ">Kademlia</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">extends</span><span style="color: #000000; "> </span><span style="color: #000000; ">BaseOverlay</span><span style="color: #000000; ">
{
    </span><span style="color: #800000; font-weight: bold; ">parameters</span><span style="color: #000000; ">:
        </span><span style="color: #000000; font-weight: bold; ">@class</span><span style="color: #000000; ">(</span><span style="color: #000000; ">Kademlia</span><span style="color: #000000; ">);
        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">minSiblingTableRefreshInterval</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">s</span><span style="color: #000000; ">); </span><span style="color: #808080; font-style: italic; ">// siblingTable refresh delay
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">minBucketRefreshInterval</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">s</span><span style="color: #000000; ">); </span><span style="color: #808080; font-style: italic; ">// bucket refresh delay
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">siblingPingInterval</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">s</span><span style="color: #000000; ">); </span><span style="color: #808080; font-style: italic; ">// interval in which all siblings get pinged (0 to disable)
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">int</span><span style="color: #000000; "> </span><span style="color: #000000; ">maxStaleCount</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// number of timeouts before node removal
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">int</span><span style="color: #000000; "> </span><span style="color: #000000; ">k</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// number of paths (size of k-bucket)
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">int</span><span style="color: #000000; "> </span><span style="color: #000000; ">b</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// network diameter O(log_{2^(b)})
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">int</span><span style="color: #000000; "> </span><span style="color: #000000; ">s</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// number of siblings
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">exhaustiveRefresh</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// if true, use exhaustive-iterative lookups to refresh buckets
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">pingNewSiblings</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// ping new unknown siblings?
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">secureMaintenance</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// if true, ping not authenticated nodes before adding them to a bucket
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">newMaintenance</span><span style="color: #000000; ">;

        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">enableReplacementCache</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// enables the replacement cache to store nodes if a bucket is full
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">replacementCachePing</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// ping the least recently used node in a full bucket, when a node is added to the replacement cache
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">int</span><span style="color: #000000; "> </span><span style="color: #000000; ">replacementCandidates</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// maximum number of candidates in the replacement cache for each bucket
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">int</span><span style="color: #000000; "> </span><span style="color: #000000; ">siblingRefreshNodes</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// number of redundant nodes for exhaustive sibling table refresh lookups (0 = numRedundantNodes)
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">int</span><span style="color: #000000; "> </span><span style="color: #000000; ">bucketRefreshNodes</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// number of redundant nodes for exhaustive bucket refresh lookups (0 = numRedundantNodes)
</span><span style="color: #000000; ">
        </span><span style="color: #808080; font-style: italic; ">// R/Kademlia
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">activePing</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// ping new neighbors?
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">proximityRouting</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// enable proximity routing (recursive only)
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">proximityNeighborSelection</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// enable proximity neighbor selection
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">altRecMode</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// use source-routing mode instead of direct mode
</span><span style="color: #000000; ">}

</span></pre>
   <hr><p class="footer"><a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top"><img src="by-sa.png"></a> This documentation is released under the <a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top">Creative Commons license</a></p>
   </body>
</html>
